function check_login()
{
	var username = getObject('username2').value;
	var password = getObject('password2').value;
	
    if (username == '' || username == '帐号' || trim(username).length < 1){
        alert('请填写帐号！');
        getObject('username2').focus();
        return false;
    }else if (password == '' || password == '密码' || trim(password).length < 1){
        alert('请填写密码！');
        getObject('password2').focus();
        return false;
    }/*else if(getObject('gamezone').selectedIndex == 0){
		alert('请选择您的分区！');
		getObject('gamezone').focus();
		return false;
	}*/

	getObject('gourl').value = getObject('gourl').value+escape("&gamezone="+getObject('gamezone').value);
    document.user_login.submit();
	return true;
}

function getObject(id) {
	if (document.getElementById(id)) {
		return document.getElementById(id);
	} else if(document.all) {
		return document.all[id];
	} else if(document.layers) {
		return document.layers[id];
	}
	
	return null;
}

function trim(str)
{
	return str.replace(/\s*/g, "");
}
